<div class="ribbon">
    <a href=""><span class="home fa fa-home"></span></a>
    <ol class="breadcrumb">
        <li>客户列表</li>
    </ol>
</div>

<div class="table-wrapper">

    <div class="toolbar">
        <form role="form">
            <div class="inline-group">
                <label class="input">客户类型：</label>
                <label class="input"><select  ng-model="q.customerType" ng-options="customerType.value for customerType in vm.customerTypeList" class="form-control" ng-selected="" ng-change="search()"></select></label>
                &nbsp;&nbsp;&nbsp;&nbsp;
                <label class="input">客户结算：</label>
                <label class="input"><select  ng-model="q.settlementType" ng-options="settlementType.value for settlementType in vm.settlementTypeList" class="form-control" ng-selected="" ng-change="search()"></select></label>
                &nbsp;&nbsp;&nbsp;&nbsp;
                <label class="input">客户等级：</label>
                <label class="input"><select  ng-model="q.customerLevel" ng-options="customerLevel.value for customerLevel in vm.customerLevelList" class="form-control" ng-selected="" ng-change="search()"></select></label>
                &nbsp;&nbsp;&nbsp;&nbsp;

                <label class="input">客户编号：</label>
                <label class="input"><input type="text"  class="form-control" ng-model="q.CustomerID"></label>
                &nbsp;&nbsp;&nbsp;&nbsp;
                <label class="input">客户姓名：</label>
                <label class="input"><input type="text"  class="form-control" ng-model="q.CustomerName"></label>
                <button type="submit" class="btn btn-sm btn-primary" ng-click="search()"><i class="fa fa-search"></i> 搜索 </button>
                <!--<button type="button" class="btn btn-sm btn-success pull-right" ng-click="initPopUp()"><i class="fa fa-plus"></i> 新增用户 </button>-->
            </div>
        </form>
    </div>
    <table class="table table-striped table-hover props table-sm">
        <thead>
        <tr>
            <th width="1%"></th>
            <th width="5%">序号</th>
            <th width="8%">客户编号</th>
            <th width="8%">客户名称</th>
            <!--<th width="8%">密码</th>-->
            <th width="5%">客户级别</th>
            <th width="5%">客户状态</th>
            <th width="10%">客户类型</th>
            <th width="10%">结算类型</th>
            <th width="10%">联系电话</th>
            <th width="15%">客户地址</th>
            <th width="25%">操作</th>
        </tr>
        </thead>
        <tbody>
        <tr ng-repeat="customer in vm.customerList">
            <td></td>
            <td class="message">{{$index+1+pager.pageSize*(pager.getCurPageNo()-1)}}</td>
            <td class="message">{{customer.userId}}</td>
            <td class="message">{{customer.name}}</td>
            <!--<td class="message">{{customer.password}}</td>-->
            <td class="message">{{customer.customerLevel.name}}</td>
            <td class="message">{{vm.customerStatusDesc[customer.status]}}</td>
            <td class="message">{{customer.customerType.name}}</td>
            <td class="message">{{customer.settlementType.name}}</td>
            <td class="message">{{customer.phone}}</td>
            <td class="message">{{customer.address.province}}{{customer.address.city}}{{customer.address.county}}{{customer.address.detail}}</td>
            <td class="operate">
                <!--<button title="详情" ng-click="viewDetails(customer)" type="button" class="btn btn-primary btn-outline btn-xs">-->
                    <!--<i class="fa fa-info-circle"></i>-->
                <!--</button>-->
                <button title="修改" ng-click="modify(customer)" type="button" class="btn btn-primary btn-outline btn-xs">
                    <i class="fa fa-edit">修改</i>
                </button>
                <button title="删除" ng-click="delete(customer)" type="button" class="btn btn-primary btn-outline btn-xs">
                    <i class="fa fa-trash-o">删除</i>
                </button>
                <!--<button title="增加气票/优惠券" ng-hide="!isTicketUser(customer)" ng-click="addCoupon(customer)" type="button" class="btn btn-primary btn-outline btn-xs">-->
                    <!--<i class="fa fa-plus-square-o "></i>-->
                <!--</button>-->
                <!--<button title="删除优惠券" ng-hide="!isTicketUser(customer)" ng-click="deleteCoupon(customer)" type="button" class="btn btn-primary btn-outline btn-xs">-->
                    <!--<i class="fa fa-minus-square-o "></i>-->
                <!--</button>-->
                <button title="增加气票/优惠券" ng-hide="!isTicketUser(customer)" ng-click="add(customer)" type="button" class="btn btn-primary btn-outline btn-xs">
                    <i class="fa fa-plus-square-o ">气票</i>
                </button>

                <button title="查看气票/优惠券" ng-hide="!isTicketUser(customer)" ng-click="deleteGasTicket(customer)" type="button" class="btn btn-primary btn-outline btn-xs">
                    <i class="fa fa-minus-square-o ">气票</i>
                </button>
                <button title="消费记录"  ng-click="showPurchaseHistory(customer)" type="button" class="btn btn-primary btn-outline btn-xs">
                    <i class="fa fa-info-circle">消费记录</i>
                </button>

            </td>
        </tr>
        </tbody>
    </table>
    <div ng-if="vm.customerList.length == 0" nj-table-no-data></div>
    <div nj-pager pager="pager"></div>
</div>
